export const shanghua = function (num, duration=random(1000, 2000)) {
    let startX = device.width / 2;
    let startY = device.height / 2;
    let endX = device.width / 2;
    let endY = device.height / 2 - num;

    // 确保坐标值在屏幕范围内
    startX = Math.max(0, Math.min(device.width - 1, startX));
    startY = Math.max(0, Math.min(device.height - 1, startY));
    endX = Math.max(0, Math.min(device.width - 1, endX));
    endY = Math.max(0, Math.min(device.height - 1, endY));

    swipe(startX, startY, endX, endY, duration);
}

export default{
    shuanghua:shanghua
}
